package com.castle.fortress.admin.contractType.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;

/**
 * 合同类型表 树形结构DTO
 *
 * @author
 * @since 2025-04-22
 */
@Data
@ApiModel(value = "contractTypeTree对象", description = "合同类型表树形结构")
public class ContractTypeTreeDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "类型ID")
    @JsonProperty("id")
    private Long id;

    @ApiModelProperty(value = "类型名称")
    @JsonProperty("typeName")
    private String typeName;

    @ApiModelProperty(value = "类型值")
    @JsonProperty("typeValue")
    private String typeValue;

    @ApiModelProperty(value = "层级：1-一级分类，2-二级分类，3-三级分类")
    @JsonProperty("level")
    private Integer level;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "父级ID，顶级为0")
    @JsonProperty("parentId")
    private Long parentId;

    @ApiModelProperty(value = "排序号")
    @JsonProperty("sortOrder")
    private Integer sortOrder;

    @ApiModelProperty(value = "子节点列表")
    @JsonProperty("children")
    private List<ContractTypeTreeDto> children;
}
